13 Stationarity, MA Models, ACF & PACF

1 Time Series Models, Stationarity

Examples

  1. Let yt=β0+β1t+εt. Then Eyt=β0+β1t,Var(yt)=σ2,Cov(yt1,yt2)=0.
  2. Let yt=β0+β1cos⁡(2πft)+β2sin⁡(2πft)+εt. Then Eyt=β0+β1cos⁡(2πft)+β2sin⁡(2πft),Var(yt)=σ2,Cov(yt1,yt2)=0.
  3. Let yt=β0+∑j=1m(β1jcos⁡2πjtn+β2jsin⁡2πjtn), with β1j,β2j∼i.i.dN(0,τj2). So Eyt=β0, and Cov(yt1,yt2)=∑j=1m[Cov(β1jcos⁡2πjt1n,β1jcos⁡2πjt2n)+Cov(β2jsin⁡2πjt1n,β2jsin⁡2πjt2n)]=∑j=1m[τj2cos⁡2πjt1ncos⁡2πjt2n+τj2sin⁡2πjt1nsin⁡2πjt2n]=∑j=1mτj2cos⁡2πj|t1−t2|n.

Stationarity

A doubly infinite sequence of random variables yt is said to be stationary if all of the following conditions hold:
4. Eyt is the same for all times t.
5. Var(yt) is the same for all times t.
6. Cov(yt1,yt2) only depends on |t1−t2|.

For a stationary {yt}, we can define γ(h)=Cov(yt,yt+h). Call γ(h) the ACVF (AutoCovariance Function). Observe that γ(0)=Cov(yt,yt),γ(h)=γ(−h), so γ(h) is a symmetric function of h, so we only consider nonnegative h.

Define ACF (AutoCorrelation Function): ρ(h)=Cov(yt,yt+h)Var(yt)Var(yt+h)=γ(h)γ(0).
So ρ(0)=1,ρ(h)=ρ(−h).

Note that

(Gaussian) White Noise Model

yt=εt,εt∼i.i.dN(0,σ2). It's easy to check that Eyt=0,γ(h)=σ21{h=0},ρ(h)=1{h=0}.

2 MA Models

The Moving Average Model (MA) with order q is defined by (2.1)yt=μ+εt+θ1εt−1+⋯+θqεt−q, where εt∼i.i.dN(0,σ2). Denote as MA(q). There are q+2 unknown parameters: μ,θ1,⋯,θq,σ.

For MA model Cov(yt,yt+h)=Cov(μ+∑j=0qθjεt−j,μ+∑k=0qθkεt+h−k)=∑j=0q∑k=0qθjθkCov(εt−j,εt+h−k).
(take θ0=1). Since {εt} is Gaussian white noise, Cov(εt−j,εt+h−k)=0, unless t−j=t+h−k⇒k=j+h. So we need 0≤j≤q,0≤k≤q,k=j+h. Then Cov(yt,yt+h)={σ2∑j=0q−hθjθj+h,0≤h≤q.0,h>q.
It does not depend on t, so MA(q) is stationary, and Cov(yt,yt+h)=γ(h), and ρ(h)={∑j=0q−hθjθj+h∑j=0qθj2,0≤h≤q,0,h>q.
For MA(1), yt=μ+εt+θεt−1, and ρ(h)={1,h=0,θ11+θ12,h=1,0,h>1.

3 Sample ACF

For fixed h, the sample ACF at lag h is defined as: ∑t=1n−h(at−a―)(bt−b―)∑t=1n−h(at−a―)2∑t=1n−h(bt−b―)2=∑t=1n−h(yt−a―)(yt+h−b―)∑t=1n−h(yt−a―)2∑t=1n−h(yn+h−b―)2, where a―=1n−h∑t=1n−hyt,b―=1n−h∑t=1n−hyt+h.
We can simplify by a―≈y―,b―≈y―, and ∑t=1n−h(yt−a―)2≈∑t=1n(yt−y―)2,∑t=1n−h(yt+h−b―)2≈∑t=1n(yt−y―)2. (reasonable when h is small compared to n). Then define sample ACF: rh=∑t=1n−h(yt−y―)(yt+h−y―)∑t=1n(yt−y―)2,h=0,1,2,⋯
Note that r0=1.

Although sample ACF can be computed for any time series, it is only useful for stationary ones.

Sample ACF is useful in determining q: sample ACF after lag q is very small/close to 0.

4 Sample PACF

Define sample PACF (Partial AutoCorrelation) of h as ϕ^h (estimate of ϕh) when AR(h) is fit to the data.

Sample PACF is useful in determining p in AR(p): sample PACF after p is very small/close to 0.

Why PACF? Suppose we have data (x1,y1),⋯,(xn,yn). The correlation is then Corr(x,y)=∑i=1n(xi−x―)(yi−y―)∑i=1n(xi−x―)2∑i=1n(yi−y―)2.
Under usual OLS (see here), β^1=∑i=1n(xi−x―)(yi−y―)∑i=1n(xi−x―)2=Corr(x,y)Var(y)Var(x).
Now we also have data on other variables z1,⋯,zk, and dataset becomes (yi,xi,zi1,⋯,zik),i=1,⋯,n. The partial correlation between x,y given z1,⋯,zk is given by Corr(x,y|z1,⋯,zk): define residual of x given z1,⋯,zk as the residual in linear regression eix|z1,⋯,zk=xi−β^0x−β^1xzi1−⋯−β^kxzik, and Corr(x,y|z1,⋯,zk)=Corr(ex|z1,⋯,zk,ey|z1,⋯,zk).
And for multiple linear regression, denote coefficients (RSS minimizer) as β^0,β^x,β^1,⋯,β^k, then β^x=Corr(x,y|z1,⋯,zk)Var(ey|z1,⋯,zk)Var(ex|z1,⋯,zk).
Now for time series setting with y1,⋯,yn with AR(p), we can write ϕ^p=Corr(yt−p,yt|yt−1,⋯,yt−p+1)Var(eyt|yt−1,⋯,yt−p+1)Var(eyt−p|yt−1,⋯,yt−p+1).
When AR(p) is stationary, ϕ^p≈Corr(yt−p,yt|yt−1,⋯,yt−p+1).